以上来源于: WordNet
As a simple example, let us create a generic function called whoami and some tagged methods to dispatch to.
作为一个简单的例子,我们来创建一个称为whoami的泛型函数以及一些要被分派标记的方法。
In prior examples, we always used the same doIt() name to define specializations of the generic function doIt().
在上一个例子中,我们总是使用相同的 doIt() 名来定义通用函数 doIt() 的独特性。
It is true enough that dispatch.on generic function signatures for new types can be added without changing the prior code.
对于新的类型来说,的确可以添加dispatch . on通用函数签名,而不用修改以前的代码。
应用推荐